import 'package:flutter/material.dart';

class OneClass extends StatefulWidget {
  const OneClass({Key? key}) : super(key: key);

  @override
  State<OneClass> createState() => _OneClassState();
}

class _OneClassState extends State<OneClass> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text("分类1"),
        ),
        body: Center(
          child: GestureDetector(
            onTap: () {
              Navigator.pushNamed(context, "/twoClass");
            },
            child: Container(
              width: 300,
              height: 300,
              color: Colors.blue,
              alignment: Alignment.center,
              child: const Text("跳转到搜索", style: TextStyle(color: Colors.white,fontSize: 18)),
            ),
          ),
        ));
  }
}
